/**
 * 
 */
package domain.interfaces;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

import org.hibernate.Query;

/**
 *
 */
public interface IDAOCrud<T extends IdObject> extends Serializable
{
	/**
	 * Retrieve all elements of type T
	 * @return A set containing all entities of class T
	 */
	public Set<T> findAll();
	
	/**
	 * Persists an entity of type T
	 * @param entity
	 */
	public void create(T entity);
	
	/**
	 * Finds an entity by it's id
	 * @param id
	 * @return entity of id entered as a parameter
	 */
	public T find(long id);	
	
	/**
	 * Updates entity to the values of the parameter
	 * @param entity
	 */
	public void update(T entity);
	
	/**
	 * Removes entity of type T
	 * @param entity
	 */
	public void delete(T entity);
	
	
	
}
